<template>
  <div class="frame">
    <Header />
    <div class="center">
      <div class="left">
        <div class="writeblog" @click="writeblog">创作博客</div>
        <el-row class="tac">
          <el-col :span="12">
            <el-menu
              default-active="2"
              class="el-menu-vertical-demo"
            >
              <el-submenu index="1">
                <template slot="title">
                  <i class="el-icon-user-solid"></i>
                  <span>管理</span>
                </template>
                <el-menu-item-group>
                  <el-menu-item index="1-1" @click="contentManagement"
                    >内容管理</el-menu-item
                  >
                  <el-menu-item index="1-2" @click="commentsManagement"
                    >评论管理</el-menu-item
                  >
                  <el-menu-item index="1-3">专栏管理</el-menu-item>
                </el-menu-item-group>
              </el-submenu>
              <el-submenu index="2">
                <template slot="title">
                  <i class="el-icon-s-data"></i>
                  <span>数据</span>
                </template>
                <el-menu-item-group>
                  <el-menu-item index="2-1">作品数据</el-menu-item>
                  <el-menu-item index="2-2">粉丝数据</el-menu-item>
                  <el-menu-item index="2-3">一周小结</el-menu-item>
                </el-menu-item-group>
              </el-submenu>
              <el-submenu index="3">
                <template slot="title">
                  <i class="el-icon-s-tools"></i>
                  <span>设置</span>
                </template>
                <el-menu-item-group>
                  <el-menu-item index="3-1">博客设置</el-menu-item>
                  <el-menu-item index="3-2">系统设置</el-menu-item>
                  <el-menu-item index="3-3" @click="ToRoleApply"
                    >角色申请</el-menu-item
                  >
                </el-menu-item-group>
              </el-submenu>
            </el-menu>
          </el-col>
        </el-row>
      </div>
      <div class="right">
        <router-view></router-view>
      </div>
    </div>
  </div>
</template>

<script>
import $ from "jquery";
import Header from "../../components/Header.vue";
export default {
  name: "CreativeCenter",
  components: {
    Header,
  },
  data() {
    return {
      UserStatus: 0,
    };
  },
  methods: {

    //跳转个人主页
    ToPersonCenter() {
      this.$router.push({
        name: "PersonalCenter",
      });
    },
    //跳转角色申请
    ToRoleApply() {
      this.$router.push({
        name: "RoleApply",
      });
    },
    //跳转内容管理
    contentManagement() {
      this.$router.push({
        name: "ContentManagement",
      });
    },
    //点击跳转评论管理
    commentsManagement() {
      this.$router.push({
        name: "CommentsManagement",
      });
    },
    // 点击跳转写博客
    writeblog() {
      this.$router.push({
        name: "WriteBlog",
      });
    },
    //点击跳转主页
    ToHomePage() {
      this.$router.push({
        name: "HomePage",
      });
    },
  },
  mounted() {
    $(".lis li").click(function () {
      $(this).css("backgroundColor", "#e9e3e3");
      $(this).siblings("li").css("backgroundColor", "");
      $(this).siblings("li").css("color", "#6d6d6d");
      $(this).css("color", "orangered");
    });
  },
};
</script>

<style lang="less" scoped>
.frame {
  background-color: #fafafa;
  min-height: 100%;
}
* {
  list-style: none;
}
a {
  text-decoration: none;
  color: black;
}
.center {
  width: 100%;
  // min-height: 700px;
  // background-color: #fafafa;
  padding: 20px;
  box-sizing: border-box;
  position: relative;
  .left {
    width: 280px;
    margin-top: 30px;
    margin-left: 20px;
    position: relative;
    top: 0;
    left: 0;
    float: left;
    vertical-align: top;
    .writeblog {
      width: 150px;
      // position: absolute;
      height: 50px;
      text-align: center;
      margin-left: 20px;
      background-color: #fff;
      border: 2px solid #ccc;
      line-height: 50px;
      margin-bottom: 20px;
      font-weight: 700;
      color: #6d6d6d;
      letter-spacing: 5px;
      border-radius: 25px;
      cursor: pointer;
      font-size: 20px;
      &:hover {
        background-color: #6d6d6d;
        color: #fff;
      }
    }
    /deep/ .el-menu {
      width: 195px;
      overflow: hidden;
    }
  }
  .right {
    background-color: #fff;
    margin-left: 50px;
    width: 1000px;
    // display: inline-block;
    // height: 500px;
    // position: absolute;
    // right: 0;
    margin-top: 50px;
    // bottom: 0;
    margin-left: 380px;
    // overflow-y: auto;
    // margin-bottom: 50px;
  }
}
</style>